<template>
  <div class="container">
    <el-container>
      <el-aside width="200px">
        <el-card>
          <el-form>
            <img v-if="loginStore.token" style="width: 70px;border-radius: 50%" src="/qq.png">
            <div class="mt-5" v-if="loginStore.token">admin</div>
          </el-form>
          <el-form>
            <img v-if="loginStore.token" src="/等级.png">
          </el-form>
          <el-form inline style="margin-left: 10px">
            <el-form-item v-if="loginStore.token">0</el-form-item>
            <el-form-item v-if="loginStore.token" style="margin-left: 20px">0</el-form-item>
          </el-form>
          <el-form inline>
            <el-form-item>关注</el-form-item>
            <el-form-item>粉丝</el-form-item>
          </el-form>
        </el-card>
        <el-card class="mt-5">资源动态</el-card>
        <el-card class="mt-5">
          <router-link to="/member" class="mt-10">我的会员</router-link>
          <div @click="doubleClick" class="mt-20">我的钱包</div>
          <div @click="doubleClick" class="mt-20">我的优惠券</div>
          <div @click="doubleClick" class="mt-20">我的订单</div>
          <div @click="doubleClick" class="mt-20">我卖的</div>
        </el-card>
        <el-card class="mt-5">
          <router-link to="/material" class="mt-10">我的资料</router-link>
        </el-card>
      </el-aside>
        <el-container>
          <el-header>
            <el-card>资源动态</el-card>
          </el-header>
          <el-main >
            <el-card style="min-height: 700px">
              <el-form inline class="elForm">
                <el-form-item class="elFormFirst">
                  <el-input style="width: 260px;" autocomplete="off;" class="w-50 m-2" placeholder="请输入" />
                  <el-button :icon="Search">搜索</el-button>
                </el-form-item>
                <el-form-item label="资源类型:">
                  <el-dropdown split-button >
                    全部资源
                    <template #dropdown>
                      <el-dropdown-menu>
                        <el-dropdown-item>全部资源</el-dropdown-item>
                        <el-dropdown-item>作品</el-dropdown-item>
                        <el-dropdown-item>教程</el-dropdown-item>
                        <el-dropdown-item>专题</el-dropdown-item>
                      </el-dropdown-menu>
                    </template>
                  </el-dropdown>
                </el-form-item>
                <el-form-item label="状态:">
                  <el-dropdown split-button >
                    全部
                    <template #dropdown>
                      <el-dropdown-menu>
                        <el-dropdown-item>全部</el-dropdown-item>
                        <el-dropdown-item>已发布</el-dropdown-item>
                        <el-dropdown-item>未发布</el-dropdown-item>
                        <el-dropdown-item>审核中</el-dropdown-item>
                        <el-dropdown-item>审核未通过</el-dropdown-item>
                        <el-dropdown-item>仅主页可见</el-dropdown-item>
                      </el-dropdown-menu>
                    </template>
                  </el-dropdown>
                </el-form-item>
              </el-form>

              <el-table border >
                <el-table-column width="318" label="内容" align="center"/>
                <el-table-column width="150" label="发布时间" align="center"/>
                <el-table-column width="150" label="数据" align="center" />
                <el-table-column width="150" label="状态" align="center" />
                <el-table-column width="150" label="操作" align="center" />
              </el-table>
            </el-card>
          </el-main>
        </el-container>
    </el-container>
  </div>
</template>


<script setup lang="ts">
import { Search} from '@element-plus/icons-vue'
import {ElMessage} from 'element-plus'
import {onMounted} from 'vue'
import { useUserInfoStore } from '@/stores/login';
import { useRoute, useRouter } from 'vue-router';
const router = useRouter()
const route = useRoute()
const loginStore = useUserInfoStore()


//正在开发中
let doubleClick =()=>{
  ElMessage({
    type: 'success',
    message: '正在开发中'
  })
}
onMounted(()=>{
  loginStore.getList();
})
</script>


<style scoped lang="less">
.container {
  width: 1200px;
  margin: 0 auto;
}
</style>
